this._grid.moveItem(item, newPage, newPosition);
}
- vfunc_allocate(box) {
- const width = box.get_width();
- const height = box.get_height();
-
- this.adaptToSize(width, height);
-
- super.vfunc_allocate(box);
- }
-
vfunc_map() {
this._swipeTracker.enabled = true;
this._connectDnD();
this._grid.goToPage(pageNumber, animate);
}
- adaptToSize(width, height) {
- let box = new Clutter.ActorBox({
- x2: width,
- y2: height,
- });
- box = this.get_theme_node().get_content_box(box);
- box = this._scrollView.get_theme_node().get_content_box(box);
- box = this._grid.get_theme_node().get_content_box(box);
-
- const availWidth = box.get_width();
- const availHeight = box.get_height();
-
- this._grid.adaptToSize(availWidth, availHeight);
-
- const leftPadding = Math.floor(
- (availWidth - this._grid.layout_manager.pageWidth) / 2);
- this._pageIndicatorOffset = leftPadding;
- this._pageArrowOffset = Math.max(
- leftPadding - PAGE_PREVIEW_MAX_ARROW_OFFSET, 0);
- }
-
_getIndicatorOffset(page, progress, baseOffset) {
const rtl = this.get_text_direction() === Clutter.TextDirection.RTL;
const translationX =
super._redisplay();
}
- adaptToSize(width, height) {
- const [, indicatorHeight] = this._pageIndicators.get_preferred_height(-1);
- height -= indicatorHeight;
-
- this._grid.findBestModeForSize(width, height);
- super.adaptToSize(width, height);
- }
-
_savePages() {
const pages = [];
page_valign: Clutter.ActorAlign.CENTER,
});
}
-
- adaptToSize(width, height) {
- this.layout_manager.adaptToSize(width, height);
- }
});
var FolderView = GObject.registerClass(
return false;
}
- adaptToSize(width, height) {
- const [, indicatorHeight] = this._pageIndicators.get_preferred_height(-1);
- height -= indicatorHeight;
-
- super.adaptToSize(width, height);
- }
-
_loadApps() {
let apps = [];
let appSys = Shell.AppSystem.get_default();
delete child._iconGridKeyFocusInId;
}
+ vfunc_allocate(box) {
+ this.layout_manager.adaptToSize(...box.get_size());
+ super.vfunc_allocate(box);
+ }
+
vfunc_style_changed() {
super.vfunc_style_changed();
return this.layout_manager.nPages;
}
- adaptToSize(width, height) {
- this.layout_manager.adaptToSize(width, height);
- }
-
setGridModes(modes) {
this._gridModes = modes ? modes : defaultGridModes;
this.queue_relayout();